package main

import (
	"time"
	"fmt"
)

func main() {
	arr := [10]int{1}
	for i := 0; i < 10; i++ {
		go func(i int) {
			for {
				arr[i] ++
				fmt.Printf("%d \n", i)
			}
		}(i)
	}
	time.Sleep(time.Minute)
	fmt.Println(arr)
}
